<template>
	<view>
		<view class="nav">
			
			<uni-nav-bar leftWidth="750rpx"   left-icon="back" leftText="返回" @clickLeft="back"></uni-nav-bar>
		</view>
		<view class="data">
			<image src="http://rnwumnvfu.hn-bkt.clouddn.com/huayou.jpg" ></image>
			<view @click="edit">编辑资料</view>
		</view>
		<view class="message">
			<text>{{nickname}}</text>
			<text>{{cont}}</text>
			
		</view>
		<view class="function">
			<view>
				<text>0</text>
				<text>获赞</text>
			</view>
			<view>
				<text>{{sumatt.length}}</text>
				<text>关注</text>
			</view>
			<view>
				<text>{{sumfans.length}}</text>
				<text>粉丝</text>
			</view>
		</view>
		<view class="empty"></view>
		<view class="shequ">
			<view>
				<text>社区</text>
			</view>
			
		</view>
		<view></view>
	</view>   	
</template>
<script>
	import http from '@/utils/http.js'
	export default {
		data() {
			return {
				nickname:'',
				cont:'',
				sumatt:[],
				sumfans:[]
			}
		},
		onShow(){
			this.showatt()
			this.showfans()
		},
		methods: {
			showfans(){
				http({
					url:`/user/getFans`,
					params:{
						id:1
					},
					success:(res)=>{
						this.sumafans=res.data.data.data
						console.log(res)
						uni.setStorageSync('storage_key', 'hello');
					}
				})
			},
			showatt(){
				http({
					url:`/user/getAttention`,
					params:{
						id:1
					},
					success:(res)=>{
						this.sumatt=res.data.data
						//console.log(res)
					}
				})
				
				
			},
			
			
			
			
			
			
			
			
			
			
			
			edit(){
				uni.navigateTo({
					url:'/pages/mine/personaldata/editdata/editdata',
					
				})
			},
			back(){
				uni.switchTab({
					url:'/pages/mine/mine'
				})
			}
		}
	}
</script>

<style>
.nav{
	
	
	height: 140rpx;
	width: 750rpx;
	display: flex;
	align-items: center;
}
.data{
	box-shadow: 0 0 0 2px #eee;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
}
.data view{
	height: 25px;
	width:150rpx;
	margin-right: 20rpx;
	text-align: center;
	color: #eee;
	background-color: #00b000;
	border-radius: 20rpx;
}
.data image{
	height: 150rpx;
	width: 150rpx;
}
.message{
	display: flex;
	flex-direction: column;
	padding-left: 20rpx;
}
.message text:nth-child(1){
	font-size: 50rpx;
	font-weight:bold;
	font-family: "楷体";
}
.message text:nth-child(2){
	font-size: 30;
	font-family: "楷体";
}
.function{
	margin-top: 10rpx;
	width: 300rpx;
	display: flex;
	justify-content: space-between;
}
.empty{
	height: 20rpx;
	background-color: #d0d5d9;
}
.shequ{
	width: 750rpx;
	border-bottom-color: #ff007f;
	
}
.shequ view:nth-child(1){
	display: flex;
	align-items: center;
	justify-content: center;
	height: 80rpx;
	border-bottom: 1px solid rgba(157, 157, 157, 1.0);
	
	font-size: 40rpx;
	font-family: "楷体";
}
.shequ>view{
	height: 100rpx;
	
	background-color: #ffffff;
	
}
</style>